#include "subwindow.h"
#include "ui_subwindow.h"

SubWindow::SubWindow(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::SubWindow)
{
    ui->setupUi(this);
    setWindowTitle("SubWindow");
    setFixedSize(200, 100);

    QPushButton *button = new QPushButton("click", this);
    connect(button, SIGNAL(clicked()), this, SLOT(onBtnClick()));

}

void SubWindow::onBtnClick()
{
    // send signal
    emit sendText("hello qt");
}


SubWindow::~SubWindow()
{
    delete ui;
}
